package com.sylli.oeuf.server.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sylli.oeuf.server.exception.BasedException;
import com.sylli.oeuf.server.manager.SessionManager;

/**
 * 
 * AdminService will serves the authentication allowance to the
 * users. Including resources(mp3,flv,images,'http-buffer' management.
 * 
 * @author Peat
 *
 */
public class AdminService extends BasedService {
	
	private static Logger log = LoggerFactory.getLogger( "service.admin" );
	
	private SessionManager sessionManager = SessionManager.getInstance();
	
	/**
	 * 
	 * Grant or re-grant used the same function, if the certain
	 * clientId already binds to any session, it'll override the
	 * current binding session.
	 * 
	 * @param clientId
	 * @param accountId
	 * @param serviceId
	 * @return long (session id of newly created or updated session).
	 */
	public long grantSession(long clientId, long accountId, long serviceId) throws BasedException {
		return 0l;
	}
	
	/**
	 * 
	 * Destroy the currently binded session with supplied clientId.
	 * 
	 * @param clientId
	 */
	public void revokeSession(long clientId) {

	}
	
	public void exceptionThrower() throws Exception {
		throw new Exception("Holyshit.");
	}
	
}
